import {
    http
} from '@/common/service/service.js'
import configService from '@/common/service/config.service.js';

// 写作列表

//写作查询项
export function apiWriteList(params) {
    return http.get('/ielts/subject/write/search/items', params);
}

// 获取试卷列表

export function apiWriteExamList(data) {
    return http.post('/ielts/subject/write/list', data);
}

// 口语列表数据
export function apiSpokenList(params) {
    return http.get('/answer/ielts/speaking/hierarchy', params);
}

// 获取口语第一个列表页的数据
export function apiSpokenDateList(data) {
    return http.post('/answer/ielts/speaking/type/list', data);
}

// 获取口语题目信息
export function apiSpokenTopic(data) {
    return http.post('/answer/ielts/speaking/topics', data);
}

// 获取口语题目信息 part2 & part3
export function apiSpokenTopicList(data) {
    return http.post('/answer/ielts/speaking/part/topics', data);
}

// 获取写作题目信息
export function apiWriteTopic(params) {
    return http.get('/answer/ielts/write/topic', params);
}
//------------------------------------------------------------
// 口语上传音频 
export function apiSpeakingUpload(data) {
    return http.post('/answer/ielts/speaking/upload', data);
}
// 我得口语录音列表
export function apiSpeakingMyRecording(params) {
    return http.get('/answer/ielts/speaking/myRecording', {
        params
    });
}
// 所有公开口语录音列表
export function apiSpeakingAllRecording(params) {
    return http.get('/answer/ielts/speaking/allRecording', {
        params
    });
}
// 口语录音点赞 / 取消点赞
export function apiSpeakingLiked(params) {
    return http.get('/answer/ielts/speaking/liked', {
        params
    });
}
// 切换口语录音公开状态
export function apiSpeakingPublic(params) {
    return http.get('/answer/ielts/speaking/public', {
        params
    });
}
// 删除录音
export function apiSpeakingDelete(params) {
    return http.get('/answer/ielts/speaking/delete', {
        params
    });
}

// 获取学员状态 是否绑定学员号，学员号是否过期
export function apiGetSpecialStudentStatus(query) {
    return http.get('/answer/ielts/specialStudentStatus', {
        params: query
    })
}

// 雅思备考资料数据
export function apiFrontList(query) {
    return http.get('/ieltsDataSphere/frontList', {
        params: query
    })
}

// 图片识别
export function apiPicOcr(query) {
    return http.post('/answer/ielts/ocr', query)
}

// 写作提交
export function writeSubmit(query) {
    return http.post('/answer/ielts/submit/writing/practice', query)
}
// 不保存
export function removeWriteSubmit(id) {
    return http.post(`/record/ielts/abandonWritingSubmit/${id}`)
}

// 提交完成详情
export function writingSubmitDetail(query) {
    return http.get('/record/ielts/writingSubmitDetail', {
        params: query
    })
}